import request from 'umi-request';
import { extendRequest } from '@/utils/request';
export async function queryPermit(params) {
  return request('/api/rule', {
    params,
  });
}
export async function queryUser(params) {
  return request('/api/rule', {
    params,
  });
}
export async function queryDepart(params) {
  return request('/api/rule', {
    params,
  });
}
export async function removePermit(params) {
  return extendRequest('/user/delete', {
    method: 'POST',
    data: {
      id: params.id,
    },
  });
}
export async function addPermit(params) {
  return extendRequest('/user/add', {
    method: 'POST',
    data: {
      ...params,
    },
  });
}

export async function getGroupList(params) {
  return extendRequest('/source/group/list', {
    method: 'POST',
    data: {
      ...params,
    },
  });
}
export async function getUserList(params) {
  return extendRequest('/source/user/list', {
    method: 'POST',
    data: {
      ...params,
    },
  });
}
export async function getList(params) {
  return extendRequest('/user/list', {
    method: 'POST',
    data: {
      ...params,
    },
  });
}
